import Vue from 'vue'
import VueRouter from 'vue-router'


import restaurant from './restaurant/index'
import usermanager from './usermanager/index'


Vue.use(VueRouter)

const routes=[
  {path:'',redirect:'/home'},
  {path:'/home',  component:()=>import("../view/menu/index.vue"),
  children:[
    {
      path:'',
      redirect:'restaurant'
    },
    restaurant,
    usermanager,
  ]


}

]
const router= new VueRouter({
  mode:'history',
  routes
})
export default router